#ifndef YOOHOO_XMPPIM_CONNECTIONTHREAD_H
#define YOOHOO_XMPPIM_CONNECTIONTHREAD_H

#include "xmppcore/connection.h"

#include <QtCore/QThread>
#include <QtCore/QPointer>

namespace yoohoo_xmppim {

using namespace yoohoo_xmppcore;

class ConnectionThread : public QThread {
	Q_OBJECT

public:
	ConnectionThread(Connection* connection = 0, QObject* parent = 0);
	~ConnectionThread();
	void setConnection(Connection* connection);
	Connection* connection();
	void start();
	void quit();
	void run();
private:
	QPointer<Connection> _connection;
};

}

#endif
